]> dgit.raspbian.org Git - gnome-shell.git/commit
blur-effect: Implement incremental calculation of gauss coefficient
authorJonas Dreßler <verdre@v0yd.nl>
Mon, 10 Feb 2020 14:34:03 +0000 (15:34 +0100)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Wed, 12 Feb 2020 14:07:55 +0000 (11:07 -0300)
commitd26bb38be95eedb9919d23123cb7368c3ab28e35
tree9f12f12d9c3277243b634272f64c1ae07eb3b53c
parentb75e61d5c8475ce41b8d5f8df405e6d30745d6c1
blur-effect: Implement incremental calculation of gauss coefficient

Use the shader for linear sampling and incremental calculation of the
gaussian kernel values as it was implemented by Patrick Walton in
webrender.

The sigma value for the blur (the standard deviation) is calculated by
taking the blur radius and dividing it by 3, this value is used by most
implementations of gaussian blurs since it covers a high percentage of
the gaussian shape.

The linear sampling optimization is implemented by skipping every second
texel (i += 2) in the for-loop that's sampling adjacent texels.

https://github.com/servo/webrender/blob/master/webrender/res/cs_blur.glsl
https://github.com/servo/webrender/commit/38ec7db6f165ff7aaad12d91eca7d7a5f51557b5

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/991
src/shell-blur-effect.c